home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Arsenal Files 4
/
The Arsenal Files 4 (Arsenal Computer).ISO
/
casm
/
au116-as.exe
/
UTIL
/
ALLOC.CPP
< prev
next >
Wrap
C/C++ Source or Header
|
1994-03-12
|
775b
|
39 lines
#include "..\au.hpp"
/**************************************************************************/
void *au_calloc(AU *au, int size, int number)
{
void *ptr;
ptr = calloc(size, number);
if (ptr == NULL)
{
au_printf_error(au, "\nOut of Memory");
exit(1);
}
return ptr;
}
/**************************************************************************/
void *au_malloc(AU *au, int size)
{
void *ptr;
ptr = malloc(size);
if (ptr == NULL)
{
au_printf_error(au, "\nOut of Memory");
exit(1);
}
return ptr;
}
/*************************************************************************/
char *string_save(AU *au, char *string)
{
char *ptr;
ptr = (char *)au_malloc(au, strlen(string)+1);
strcpy(ptr, string);
return ptr;
}